#include<stdio.h>
//定义数组长度，用常量表
#define MaxSize 50
//定义数据类型 
typedef int ElemType;

typedef struct
{
    ElemType data[MaxSize];
    int length;
}SqList;
bool merge(SqList *A,SqList *B,SqList *&C)
{
    if(A->length+B->length>C->length)
        return false;
    int i=0,j=0,k=0;
    while(i<A->length && j<B->length)
    {
        if(A->data[i]<B->data[i])
            C->data[k]=A->data[i];
            i++;k++;
        if(A->data[i]>B->data[j])
            C->data[k]=B->data[j];
            k++;j++;
    }
    while(i<A->length)
    {
        C->data[k++]=A->data[i];
    }
    while(j<B->length)
    {
        C->data[k++]=B->data[j];
    }
    C->length=k;
    return true;
}
int main()
{
    SqList *L,*L1,*L2;
    ElemType e;
    printf("合并两个有序数组\n");
    merge(L1,L2,L);
}